package com.hotel.hotelsystem.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.common.utils.ResultUtils;
import com.common.utils.ResultVo;
import com.hotel.hotelsystem.pojo.RoomList;
import com.hotel.ordersystem.pojo.CommentMongoDB;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * (RoomList)表服务接口
 *
 * @author makejava
 * @since 2022-09-30 18:23:54
 */
public interface RoomListService {
    List<RoomList> selectHotelToRoomList(int hotelId);
    List<RoomList> selectHotelToRoomListTimeSearch(LocalDateTime startTime, LocalDateTime endTime,int hotelId);
    //查询所有评论内容
    ResultVo<List<CommentMongoDB>> getCommentByHotelId(String hotelId);
    //即时更新评论内容(头像 & 用户名)
    Boolean setCommentInformation();
    ResultVo<CommentMongoDB> getCommentByOrderId(String hotelId);
    //roomList房间信息保存到redis当中
    boolean roomListSaveRedis();
    //redis分布式锁进行减库存
    void roomListLessInventory(Integer roomTypeId);
    //根据前端所传的房间类型id
    List<RoomList> getRoomListByRoomTypeId(Map map);
    //根据用户id查询对象(num 为 剩余数量)
    RoomList getById(String id,String num);
}

